using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Geodatabase
{
    /// <summary>
    /// <para>Extract Data By Feature</para>
    /// <para>Extracts features from multiple
    /// input feature classes into a target database.</para>
    /// <para>从多个中提取特征
    /// 将要素类输入到目标数据库中。</para>
    /// </summary>    
    [DisplayName("Extract Data By Feature")]
    public class ExtractDataByFeature : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExtractDataByFeature()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_datasets">
        /// <para>Input Datasets</para>
        /// <para><xdoc>
        ///   <para>A value table of rows that contain a dataset to extract and a filter option for that dataset. Specifying a filter option allows you to control how rows are replicated in each dataset. The following are filter options:</para>
        ///   <bulletList>
        ///     <bullet_item>Dataset—The schema of the dataset will be extracted to the child workspace</bullet_item><para/>
        ///     <bullet_item>Rows Option—Specifies whether all rows, only the schema, or features that match filter criteria will be extracted.
        ///     <bulletList>
        ///       <bullet_item>All Rows—All rows of the dataset will be extracted to the child workspace.  </bullet_item><para/>
        ///       <bullet_item>Schema Only—Only the schema of the dataset will be extracted to the child workspace.  </bullet_item><para/>
        ///       <bullet_item>Use Filters—If a feature layer is specified for the Filter Feature Layer parameter, features that either intersect or are contained by features in the Filter Feature Layer parameter will be extracted.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要提取的数据集的行的值表以及该数据集的筛选器选项。通过指定筛选器选项，可以控制行在每个数据集中的复制方式。以下是筛选器选项：</para>
        ///   <bulletList>
        ///     <bullet_item>数据集 - 数据集的方案将被提取到子工作空间</bullet_item><para/>
        /// <bullet_item>行选项 （Rows Option） - 指定是提取所有行、仅方案还是与过滤条件匹配的要素。
        ///     <bulletList>
        ///       <bullet_item>所有行 - 数据集的所有行都将提取到子工作空间。</bullet_item><para/>
        ///       <bullet_item>仅方案 - 仅将数据集的方案提取到子工作空间。</bullet_item><para/>
        ///       <bullet_item>使用过滤器 - 如果为过滤器要素图层参数指定了要素图层，则将提取与过滤器要素图层参数中的要素相交或被要素包含的要素。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_target_gdb">
        /// <para>Target Geodatabase</para>
        /// <para>The workspace into which data will be extracted.</para>
        /// <para>将提取数据的工作区。</para>
        /// </param>
        public ExtractDataByFeature(object _in_datasets, object _target_gdb)
        {
            this._in_datasets = _in_datasets;
            this._target_gdb = _target_gdb;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Extract Data By Feature";

        public override string CallName => "topographic.ExtractDataByFeature";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_datasets, _target_gdb, _reuse_schema.GetGPValue(), _filter_feature, _filter_type.GetGPValue(), _checkout_replica.GetGPValue(), _replica_name, _updated_target_gdb, _expand_feature_classes_and_tables.GetGPValue(), _get_related_data.GetGPValue(), _excluded_rel_classes, _where_clause];

        /// <summary>
        /// <para>Input Datasets</para>
        /// <para><xdoc>
        ///   <para>A value table of rows that contain a dataset to extract and a filter option for that dataset. Specifying a filter option allows you to control how rows are replicated in each dataset. The following are filter options:</para>
        ///   <bulletList>
        ///     <bullet_item>Dataset—The schema of the dataset will be extracted to the child workspace</bullet_item><para/>
        ///     <bullet_item>Rows Option—Specifies whether all rows, only the schema, or features that match filter criteria will be extracted.
        ///     <bulletList>
        ///       <bullet_item>All Rows—All rows of the dataset will be extracted to the child workspace.  </bullet_item><para/>
        ///       <bullet_item>Schema Only—Only the schema of the dataset will be extracted to the child workspace.  </bullet_item><para/>
        ///       <bullet_item>Use Filters—If a feature layer is specified for the Filter Feature Layer parameter, features that either intersect or are contained by features in the Filter Feature Layer parameter will be extracted.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要提取的数据集的行的值表以及该数据集的筛选器选项。通过指定筛选器选项，可以控制行在每个数据集中的复制方式。以下是筛选器选项：</para>
        ///   <bulletList>
        ///     <bullet_item>数据集 - 数据集的方案将被提取到子工作空间</bullet_item><para/>
        /// <bullet_item>行选项 （Rows Option） - 指定是提取所有行、仅方案还是与过滤条件匹配的要素。
        ///     <bulletList>
        ///       <bullet_item>所有行 - 数据集的所有行都将提取到子工作空间。</bullet_item><para/>
        ///       <bullet_item>仅方案 - 仅将数据集的方案提取到子工作空间。</bullet_item><para/>
        ///       <bullet_item>使用过滤器 - 如果为过滤器要素图层参数指定了要素图层，则将提取与过滤器要素图层参数中的要素相交或被要素包含的要素。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Datasets")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_datasets { get; set; }


        /// <summary>
        /// <para>Target Geodatabase</para>
        /// <para>The workspace into which data will be extracted.</para>
        /// <para>将提取数据的工作区。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_gdb { get; set; }


        /// <summary>
        /// <para>Re-use Schema</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a geodatabase that contains the schema of the data to extract will be reused. This reduces the amount of time required to extract the data. This option is only supported for file geodatabases.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The schema will be reused.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The schema will not be reused. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否重复使用包含要提取的数据方案的地理数据库。这减少了提取数据所需的时间。此选项仅支持文件地理数据库。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将重复使用方案。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会重复使用方案。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Re-use Schema")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reuse_schema_value _reuse_schema { get; set; } = _reuse_schema_value._false;

        public enum _reuse_schema_value
        {
            /// <summary>
            /// <para>REUSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REUSE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_REUSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_REUSE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Filter Feature Layer</para>
        /// <para>A feature layer with one selected feature used to limit the extent of the data that will be extracted.</para>
        /// <para>具有一个选定要素的要素图层，用于限制将要提取的数据的范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filter Feature Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _filter_feature { get; set; } = null;


        /// <summary>
        /// <para>Filter Spatial Relation</para>
        /// <para><xdoc>
        ///   <para>Specifies the spatial relationship between the Filter Feature Layer and Input Datasets parameter values and how that relationship will be filtered. The spatial relationship is applied to data in an extent defined by the area of interest (AOI) specified in the Filter Feature Layer parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Intersects—Features in the Input Datasets parameter that intersect features in the Filter Feature Layer parameter will be extracted.</bullet_item><para/>
        ///     <bullet_item>Contains—Features in the Input Datasets parameter that are contained by the selected feature in the Filter Feature Layer parameter will be extracted.</bullet_item><para/>
        ///     <bullet_item>Clip—Features in the Input Datasets parameter that intersect features in the Filter Feature Layer parameter will be extracted, and the features will be split at the AOI boundary and only those within the AOI will be kept.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定过滤器要素图层和输入数据集参数值之间的空间关系以及如何过滤该关系。空间关系将应用于由过滤器要素图层参数中指定的感兴趣区域 （AOI） 定义的范围内的数据。</para>
        ///   <bulletList>
        ///     <bullet_item>相交—将提取输入数据集参数中与过滤器要素图层参数中的要素相交的要素。</bullet_item><para/>
        ///     <bullet_item>包含—将提取输入数据集参数中由过滤器要素图层参数中的所选要素所包含的要素。</bullet_item><para/>
        ///     <bullet_item>裁剪 - 将提取输入数据集参数中与过滤器要素图层参数中的要素相交的要素，并在 AOI 边界处分割要素，仅保留 AOI 中的要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filter Spatial Relation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _filter_type_value? _filter_type { get; set; } = null;

        public enum _filter_type_value
        {
            /// <summary>
            /// <para>Intersects</para>
            /// <para>Intersects—Features in the Input Datasets parameter that intersect features in the Filter Feature Layer parameter will be extracted.</para>
            /// <para>相交—将提取输入数据集参数中与过滤器要素图层参数中的要素相交的要素。</para>
            /// </summary>
            [Description("Intersects")]
            [GPEnumValue("INTERSECTS")]
            _INTERSECTS,

            /// <summary>
            /// <para>Contains</para>
            /// <para>Contains—Features in the Input Datasets parameter that are contained by the selected feature in the Filter Feature Layer parameter will be extracted.</para>
            /// <para>包含—将提取输入数据集参数中由过滤器要素图层参数中的所选要素所包含的要素。</para>
            /// </summary>
            [Description("Contains")]
            [GPEnumValue("CONTAINS")]
            _CONTAINS,

            /// <summary>
            /// <para>Clip</para>
            /// <para>Clip—Features in the Input Datasets parameter that intersect features in the Filter Feature Layer parameter will be extracted, and the features will be split at the AOI boundary and only those within the AOI will be kept.</para>
            /// <para>裁剪 - 将提取输入数据集参数中与过滤器要素图层参数中的要素相交的要素，并在 AOI 边界处分割要素，仅保留 AOI 中的要素。</para>
            /// </summary>
            [Description("Clip")]
            [GPEnumValue("CLIP")]
            _CLIP,

        }

        /// <summary>
        /// <para>Checkout replica</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the data will be checked out, replicated, edited, and checked back in one time.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The replica will be checked out.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The replica will not be checked out. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否一次性检出、复制、编辑和签回数据。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将检出复本。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会检出复本。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Checkout replica")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _checkout_replica_value _checkout_replica { get; set; } = _checkout_replica_value._false;

        public enum _checkout_replica_value
        {
            /// <summary>
            /// <para>CHECKOUT_REPLICA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CHECKOUT_REPLICA")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_CHECKOUT_REPLICA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_CHECKOUT_REPLICA")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Replica Name</para>
        /// <para>The name of the replica to check out.</para>
        /// <para>要签出的副本的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Replica Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _replica_name { get; set; } = null;


        /// <summary>
        /// <para>Updated Target Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Target Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_target_gdb { get; set; }


        /// <summary>
        /// <para>Expand Feature Classes and Tables</para>
        /// <para><xdoc>
        ///   <para>Specifies whether expanded feature classes and tables—such as those in networks, topologies, or relationship classes—will be added.</para>
        ///   <bulletList>
        ///     <bullet_item>Use defaults—The expanded feature classes and tables related to the feature classes and tables in the replica will be added. The default for feature classes is to replicate all features intersecting the spatial filter. If no spatial filter has been provided, all features are included. The default for tables is to replicate only the schema.</bullet_item><para/>
        ///     <bullet_item>Add with schema only—Only the schema for the expanded feature classes and tables will be added.</bullet_item><para/>
        ///     <bullet_item>All rows—All rows for expanded feature classes and tables will be added.</bullet_item><para/>
        ///     <bullet_item>Do not add—No expanded feature classes and tables will be added. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否添加扩展的要素类和表，例如网络、拓扑或关系类中的要素类和表。</para>
        ///   <bulletList>
        ///     <bullet_item>使用默认值 - 将添加与复本中的要素类和表相关的展开要素类和表。要素类的默认设置是复制与空间过滤器相交的所有要素。如果未提供空间过滤器，则包括所有要素。表的默认值是仅复制架构。</bullet_item><para/>
        ///     <bullet_item>仅使用方案添加 - 仅添加扩展要素类和表的方案。</bullet_item><para/>
        ///     <bullet_item>所有行—将添加展开要素类和表的所有行。</bullet_item><para/>
        ///     <bullet_item>不添加 - 不会添加扩展的要素类和表。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expand Feature Classes and Tables")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _expand_feature_classes_and_tables_value _expand_feature_classes_and_tables { get; set; } = _expand_feature_classes_and_tables_value._DO_NOT_ADD;

        public enum _expand_feature_classes_and_tables_value
        {
            /// <summary>
            /// <para>Use defaults</para>
            /// <para>Use defaults—The expanded feature classes and tables related to the feature classes and tables in the replica will be added. The default for feature classes is to replicate all features intersecting the spatial filter. If no spatial filter has been provided, all features are included. The default for tables is to replicate only the schema.</para>
            /// <para>使用默认值 - 将添加与复本中的要素类和表相关的展开要素类和表。要素类的默认设置是复制与空间过滤器相交的所有要素。如果未提供空间过滤器，则包括所有要素。表的默认值是仅复制架构。</para>
            /// </summary>
            [Description("Use defaults")]
            [GPEnumValue("USE_DEFAULTS")]
            _USE_DEFAULTS,

            /// <summary>
            /// <para>Add with schema only</para>
            /// <para>Add with schema only—Only the schema for the expanded feature classes and tables will be added.</para>
            /// <para>仅使用方案添加 - 仅添加扩展要素类和表的方案。</para>
            /// </summary>
            [Description("Add with schema only")]
            [GPEnumValue("ADD_WITH_SCHEMA_ONLY")]
            _ADD_WITH_SCHEMA_ONLY,

            /// <summary>
            /// <para>All rows</para>
            /// <para>All rows—All rows for expanded feature classes and tables will be added.</para>
            /// <para>所有行—将添加展开要素类和表的所有行。</para>
            /// </summary>
            [Description("All rows")]
            [GPEnumValue("ALL_ROWS")]
            _ALL_ROWS,

            /// <summary>
            /// <para>Do not add</para>
            /// <para>Do not add—No expanded feature classes and tables will be added. This is the default.</para>
            /// <para>不添加 - 不会添加扩展的要素类和表。这是默认设置。</para>
            /// </summary>
            [Description("Do not add")]
            [GPEnumValue("DO_NOT_ADD")]
            _DO_NOT_ADD,

        }

        /// <summary>
        /// <para>Replicate Related Data</para>
        /// <para><xdoc>
        ///   <para>Specifies whether rows related to existing rows in the replica will be replicated. For example, consider a feature (f1) inside the replication filter and a related feature (f2) from another class outside the filter. Feature f2 is included in the replica if you choose to replicate related data.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Related data will be replicated.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Related data will not be replicated. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否复制与副本中的现有行相关的行。例如，考虑复制筛选器内的功能 （f1） 和筛选器外部另一个类中的相关功能 （f2）。如果选择复制相关数据，则功能 f2 将包含在复本中。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将复制相关数据。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将不复制相关数据。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Replicate Related Data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _get_related_data_value _get_related_data { get; set; } = _get_related_data_value._false;

        public enum _get_related_data_value
        {
            /// <summary>
            /// <para>GET_RELATED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GET_RELATED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_GET_RELATED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_GET_RELATED")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Excluded Relationship Classes</para>
        /// <para>The relationship classes with the relationships to exclude from extraction. The relationship classes will still be included if both datasets that participate are present but the related objects are not extracted.</para>
        /// <para>具有要从提取中排除的关系的关系类。如果参与的两个数据集都存在，但未提取相关对象，则仍将包含关系类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Excluded Relationship Classes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _excluded_rel_classes { get; set; } = null;


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression that is used to further refine results from the AOI extraction.</para>
        /// <para>一个 SQL 表达式，用于进一步优化 AOI 提取的结果。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        public ExtractDataByFeature SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}